home *** CD-ROM | disk | FTP | other *** search
- Short: Parse httpd log files
-
- httplog.c
-
- (c) Armin Obersteiner
-
- Parsing ncsa/cern httpd logfile
-
- USAGE: httplog [-s <keyword>] [-l] <logfile>
-
- <logfile> - httpd <logfile>
- -l - long: country statistics
- -lt - long: time statistics
- -s <keyword> - search for <keyword>
-
- compiles on: MaxonC++ (amiga)
- gcc (amiga)
- gcc (bsd)
- (it should actually compile on any platform then :)
-
- ->>> gcc -o httplog httplog.c -lm
-
- it´s made to work on ncsa logfiles:
-
- Site [Weekday Month Day Hours(24):Min:Sec Year] Method URL Protocol
-
- and cern logfiles:
-
- Site - - [Day/Month/Year:Hours(24):Min:Sec +GMT_Hours] "Method URL Protocol" #1 #2
-
-
-
- to include new countries:
-
- - add lines to structure "struct dummy c"
- - don´t forget to increase "country_anz"
-
- to adapt time and date for other logfile formats:
-
- - do the same with "struct dummy d" / "struct dummy t"
- - don´t forget to increase/decrease "day_anz" :) / "time_anz"
-
- the second entry in these stuctures (dummy) is the string to search for
- (use spaces or brackets, because it´s more reliable then)
- the third entry is the string for output
-
-
- CU Armin :)
-
- ( Armin.Obersteiner@giga.or.at )
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 14860 6727 54.7% 10-Apr-95 01:01:30 httplog
- 11739 3076 73.7% 10-Apr-95 01:00:58 httplog.c
- 1337 602 54.9% 10-Apr-95 01:11:36 httplog.doc
- 1411 676 52.0% 10-Apr-95 01:10:18 httplog.html
- -------- ------- ----- --------- --------
- 29347 11081 62.2% 11-Apr-95 23:53:32 4 files
-